package com.zheng.damo01.作业;

import java.math.BigDecimal;
import java.math.RoundingMode;

public class Test09 implements Handleable{
    public static void main(String[] args) {
        String str="23.23456789";
        System.out.println("原数字："+str);
        System.out.println("取整数："+new Test09().handleSreing(str));

    }

    @Override
    public String handleSreing(String num) {
        BigDecimal big=new BigDecimal(num);

        return big.divide(new BigDecimal(1),0, RoundingMode.HALF_UP).toString();
    }
}
interface Handleable{
    String handleSreing(String num);
}
